//
//  HistoryCell.m
//  LiveStar
//
//  Created by 漪珊 on 2017/2/7.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "HistoryCell.h"
CGFloat cellHeight = 25;

@implementation HistoryCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.titileLabel.layer.cornerRadius = 5;
    self.titileLabel.clipsToBounds = YES;
    self.backgroundColor = [UIColor cellLineColor];
}

- (void)setKeyWord:(NSString *)keyWord {
    _keyWord = keyWord;
    self.titileLabel.text = keyWord;
    [self layoutIfNeeded];
    [self updateConstraintsIfNeeded];
}

- (CGSize)sizeForCell {
    return CGSizeMake([self.titileLabel sizeThatFits:CGSizeMake(MAXFLOAT, MAXFLOAT)].width + 20 , cellHeight);
}
@end
